package com.okq.service.Impl;

import com.okq.dao.LogDao;
import com.okq.entity.Log;
import com.okq.service.ILogService;
import com.okq.util.page.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 描述 : 系统日志接口实现类
 * 作者 : zdl
 * 日期 : 2017/6/29 11:31
 */
@Transactional
@Service
public class LogServiceImpl implements ILogService {
    @Autowired
    private LogDao logDao;

    @Override
    public void saveLog(Log log) {
        logDao.saveLog(log);
    }

    @Override
    public void deleteLog(Log log) {
        logDao.deleteLog(log);
    }

    @Override
    public void updateLog(Log log) {
        logDao.updateLog(log);
    }

    @Override
    public Log getLogById(String id) {
        return logDao.getLogById(id);
    }

    @Override
    public List<Log> listAllLog() {
        return logDao.listAllLog();
    }

    @Override
    public Page<Log> pageByLog(Page<Log> page, Log log) {
        return logDao.pageByLog(page, log);
    }

    @Override
    public List<Log> listLastTenLog() {
        return logDao.listLastTenLog();
    }
}
